package com.itboye.allshengmedical.sci.packet.resp;

public class UpdateRespPacket extends BaseRespPacket {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	BaseRespPacket packet;

	public UpdateRespPacket(BaseRespPacket packet) {
		this.clone(packet);
		this.packet = packet;
		this.setExpectDataLength(10);
	}

	private byte get(int index) {
		// for (int i = 0; i < packet.getContent().length; i++) {
		// Log.e("hu  " + i,
		// Integer.parseInt(packet.getContent()[index] + "", 16) + "");
		// }
		return packet.getContent()[index];
	}

	public String isEnd() {
		if (get(1) == 2) {
			if (get(2) == 1) {     
				return "success";
			} else {
				return "end";
			}
		}
		return "start";

	}
}
